//使用直接字面量
let student = {
    name: '茂茂',
    age: 22,
    gender: '男',
    //show方法
    show: function () {
        document.write('name=' + this.name + ',age=' + this.age + ',gender=' + this.gender)
    },
}
//对象的使用
student.show()
//可以修改对象的属性值
student.age = 20
student.show()
//获得对象的属性值
console.log(student.gender)
//狗--对象
let dog = {
    name: '旺财',
    age: '3',
    eat() {
        console.log('name=' + this.name + '在啃骨头')
    }
}
dog.eat()